package com.hand.demo.infra.repository.impl;

import org.apache.commons.collections.CollectionUtils;
import org.hzero.mybatis.base.impl.BaseRepositoryImpl;
import org.springframework.stereotype.Component;
import com.hand.demo.domain.entity.HhrTaCategory;
import com.hand.demo.domain.repository.HhrTaCategoryRepository;
import com.hand.demo.infra.mapper.HhrTaCategoryMapper;

import javax.annotation.Resource;
import java.util.List;

/**
 * 标签分类表(HhrTaCategory)资源库
 *
 * @author
 * @since 2025-07-02 11:10:33
 */
@Component
public class HhrTaCategoryRepositoryImpl extends BaseRepositoryImpl<HhrTaCategory> implements HhrTaCategoryRepository {
    @Resource
    private HhrTaCategoryMapper hhrTaCategoryMapper;

    @Override
    public List<HhrTaCategory> selectList(HhrTaCategory hhrTaCategory) {
        return hhrTaCategoryMapper.selectList(hhrTaCategory);
    }

    @Override
    public HhrTaCategory selectByPrimary(Long id) {
        HhrTaCategory hhrTaCategory = new HhrTaCategory();
        hhrTaCategory.setId(id);
        List<HhrTaCategory> hhrTaCategorys = hhrTaCategoryMapper.selectList(hhrTaCategory);
        if (hhrTaCategorys.size() == 0) {
            return null;
        }
        return hhrTaCategorys.get(0);
    }

}

